package fun.werfamily.wf.payment.core.domain.service;


import fun.werfamily.wf.payment.core.domain.dto.req.PayCancelReq;
import fun.werfamily.wf.payment.core.domain.dto.req.PayCreateReq;
import fun.werfamily.wf.payment.core.domain.dto.resp.PayCancelSuccessRespDTO;
import fun.werfamily.wf.payment.core.domain.dto.resp.PaySuccessRespDTO;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Mr.WenMing Zhang
 * @Date: 2023-05-02 19:33
 * @Description:
 */
public interface IPaymentService {

    /**
     * 创建支付单
     *
     * @param req
     * @return
     */
    PaySuccessRespDTO createPay(PayCreateReq req);

    /**
     * 取消支付
     *
     * @param req
     * @return
     */
    PayCancelSuccessRespDTO cancelPay(PayCancelReq req);

    /**
     * 异步结果通知
     *
     * @param request
     */
    void notify(HttpServletRequest request, HttpServletResponse response);

    /**
     * 查询支付状态
     *
     * @param orderNo
     * @return
     */
    String getPayStatus(String orderNo);
}
